<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>
        {block name="title"}{/block}
    </title>
    <link rel="stylesheet" type="text/css" href="__CSS__/model.css">
</head>
<body background="__BG_IMG__">
    <!--头部-->
    {include file="../common/top"}
    <!--主体-->
    <div id="body1">
        <div id="body2">
            {block name="main"}{/block}
        </div>
    </div>
    <div id="back_top" style="position:fixed;left: 90%;bottom: 10%">
        <a href="#" onclick="backTop()">
            <div>
                <p style="background: white;color:gray;font-size:12px;width: 48px;transform: translate(30px,0)">返回顶部</p>
            </div>
            <img src="__IMG__/back_top.png" width="35%">
        </a><br>
    </div>
    <style>
        #body1{
            text-align: center;
            width: 100%;
            height: 100%;
        }
        #body2{
            position: absolute;
            background: white;
            top: 90px;
            left: 50%;
            transform: translate(-50%,0);
            width: 70%;
        }
    </style>
    <script>
        var main = document.getElementById('main');
        main.style.height = main.offsetHeight-85+'px';

        function backTop() {
            this.backTime=window.setInterval("run()",15);
        }
        function run() {
            var sc=document.body.scrollTop;
            if (sc>0){
                document.body.scrollTop-=50;
            }
            if (sc==0){
                window.clearInterval(this.backTime);
            }
        }
        var body = document.getElementById('body2');
        window.onload = function () {
            body.style.height = body.offsetHeight-90+'px';
        }
    </script>
</body>
</html>